1. Field of the Invention
This invention relates to power supplies and more particularly relates to measuring voltage, current, and power in a power supply comprising a switching power stage.
2. Description of the Related Art
Electronics are ubiquitous in the present age. And for each electronic device, there is some corresponding power supply that provides the necessary energy to operate the device. These power supplies may be external (such as a power brick for a stereo), internal (as is often the case for desktop computers), or some combination thereof (laptops). The power supply typically has the responsibility of providing one or more tightly regulated output voltages and/or currents for use by the various components that make up the device. For example, a typical computer power supply will provide +3.3V, +5V, +12V, and −12V buses. The power supply maintains these values even when the load represented by the various components changes.
Many of these electronic devices plug into a standard alternating current (AC) wall outlet and the power supply converts the AC input into the appropriate direct current (DC) outputs. The conversion of the AC input to the appropriate DC output typically involves putting the input signal through a number of stages, such as a rectification stage, pre-regulation stage (for example, active harmonic filtering), and various regulation stages.
Using switching power supply stages offers a number of advantages to a designer. Those of skill in the art recognize that switching power supply stages (such as boost converters, buck converters, and related topologies) can be used to provide active power factor correction by controlling the input current of the load so that it is proportional to the input voltage. In this manner, active power factor correction can provide a power factor close to unity, thus reducing energy losses and harmonics in the system. Switching power supply stages can also be configured to provide tightly regulated output voltages in spite of changes to the load.
Individuals using an electronic device often want to know how much power is being used by or presented to the electronic device. For example, a corporation designing a data center will want to know the power requirements for their system. While providers often give projected power requirements, actual power measurements are much more accurate and allow greater precision in generating the design. The corporate client may want to be able to monitor the power drawn from an AC line by one system in comparison to the power drawn by a competitor's system. With a large data center, if all other things are equal, the power consumption and associated cost may be the critical factor in choosing one system over another.
As a result, providers of electronics are incorporating components for providing information on actual power usage into their power supplies. However, the existing solution (shown in FIG. 1) requires the addition of complex circuitry to the power supply. For example, the present solution involves monitoring the AC line voltage and the AC line current using a Hall Effect current sensor to get the AC line voltage sample 110, the AC line current sample 112, and the corresponding input AC line voltage 114 and Input AC line Current 116. These values are converted using an analog-to digital converters (A/D) 118a and 118b and stored in registers in a primary microcontroller 130 on the primary side.
In order to provide the necessary electrical isolation, optocouplers 120a and 120b are used to transfer the voltage and current values from registers on the primary microcontroller 130 to registers R1 and R2 respectively in a secondary microcontroller 132 on the secondary side. The contents of these registers are then multiplied and stored in R3 as the power. The contents are read over an I2C bus or other communication bus represented by the serial data address (SDA) line 140 and the serial clock (SCLK) 142.
While this solution does provide power information to a user, it does so at considerable cost. The addition of the microcontrollers 130 and 132, along with the various A/D converters and optocouplers increases the cost of the power supply. In addition, it introduces more complex circuitry and a corresponding increase in the likelihood of failure of at least the power reading module shown in FIG. 1.